package com.banksystem.service.impl;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.banksystem.entity.Liuyan;
import com.banksystem.mapper.Liuyanmapper;
import com.banksystem.service.Liuyanservice;

@Service
public class Liuyanserviceimpl implements Liuyanservice {

	@Autowired
	private Liuyanmapper mapper;
	
	@Override
	public List<Liuyan> findliuyanall(String gname) {
		// TODO Auto-generated method stub
		return mapper.findliuyanall(gname);
	}

	@Override
	public List<Liuyan> adminfindliuyanall() {
		// TODO Auto-generated method stub
		return mapper.adminfindliuyanall();
	}

	@Override
	public void deletely(String id) {
		// TODO Auto-generated method stub
		mapper.deletely(id);
	}

	@Override
	public List<Liuyan> findliuyanAlllike(String seach, String gname) {
		// TODO Auto-generated method stub
		return mapper.findliuyanAlllike(seach, gname);
	}

	@Override
	public void addly(String name, String title, String js) {
		// TODO Auto-generated method stub
		mapper.addly(name, title, js, date());
	}
	public String date() {
		SimpleDateFormat sdf=new SimpleDateFormat("yyy-MM-dd");
		return sdf.format(new Date());
	}
}
